<!--
 * @Author: White
 * @description: 封装element弹窗dialog公共组件
 * @LastEditTime: 2021-06-28 17:05:00
-->

<template>
    <div>
        <!-- 传入publiconfig对象 -->
        <el-dialog
       :title="publiconfig.title"
       :visible.sync="publiconfig.show"
       :width="publiconfig.width"
       :before-close="handleClose"
       :show-close='true'
       custom-class="dialogStyle">
       <div class="public-dialog-content" :style="{height:publiconfig.height}" >
         <slot name="public-dialog-content"></slot>
       </div>
       <span slot="footer" class="public-dialog-footer">
          <slot name="public-dialog-footer"></slot>
       </span>
     </el-dialog>
    </div>
</template>

<script>
export default {
     props:{
       publiconfig:{
         type:Object,
       }
     },
     data(){
       return {
       }
     },
     mounted(){
     },
     methods:{
       handleClose(){
         this.publiconfig.show=false
       }
     }
   }
</script>